package uk.ac.ncl.teach.ex.people;

/** 
 * UsePersonOverriding - simple demonstration of method overriding and 
 * overloading in the Person hierarchy.
 *
 * @author Nick Cook &lt;nick.cook@ncl.ac.uk&gt;
 * @version $Revision: 1624 $<br />
 * $Date: 2011-01-17 12:20:26 +0000 (Mon, 17 Jan 2011) $<br />
 * Copyright (C) 2007 Newcastle University, UK
 */ 
public class UsePersonOverriding {

    /**
     * Demonstrate use of classes in the Person hierarchy.
     *
     * @param args arguments are ignored.
     */
    public static void main(String[] args) {
        Person p = new Person("Fred", 21);
        Student s = new Student("Fiona", 20, "Newcastle", 1);
        
        // p.printDetails(); // calls Person printDetails
        // s.printDetails(); // calls Student printDetails
        
        // p = s;            // assign Student to Person reference
       
        // p.printDetails(); // calls which printDetails?
        
    }
}
